package com.spring.annotation;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author Administrator
 *
 */
@Configuration
@Import(Database.class)
public class DatabaseConfig {
	private final Database database;

	public DatabaseConfig(Database database) {
		this.database = database;
	}
	
	@Bean
	public OracleBean getBean() {
		return new OracleBean(database.getDriverClass());
	}
}
